package com.song.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.song.po.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import org.springframework.stereotype.Repository;

@Repository
public interface UserDao extends BaseMapper<User> {


//   /**
//    * 登录查询
//    * @param wrapper
//    * @return
//    */
//   @Select("select * from t_userRole as userRole"+
//   " inner join t_user as u on u.user_id = userRole.user_id"+
//   " inner join t_role as role on role.role_id = userRole.role_id"+
//   " inner join role_permission as rp on userRole.role_id = rp.role_id"+
//   " inner join t_permission as permission on rp.permission_id = permission.permission_id" +
//   " ${ew.customSqlSegment}")
//   @ResultMap("com.song.dao.UserDao.userMap")
//   public User getUser(@Param(Constants.WRAPPER)QueryWrapper<User> wrapper);


}
